1. Field of the Invention
This invention relates to the field of communications, and in particular to the field of data communications between a host device and a peripheral device via a serial interface.
2. Description of Related Art
The use of a serial interface between components is often preferable to a parallel interface. The use of a serial interface for communicating the data can provide for significant cost savings. The cost of the media to carry the serial information is less than that of a parallel interface. If a wired connection is used, fewer wires are required between the devices; if a wireless connection is used, fewer channels are required between the devices. The communicating devices will also be less costly because the interconnection ports, such as pads on an integrated circuit or pins on a printed circuit board, are often more costly than the circuitry required to convert data between parallel and serial forms. And, particularly in integrated circuit design, the number of available interconnection ports is often a fixed constraint, from both a cost and feasibility viewpoint. Typically, to achieve the benefits of a serial interface, a single channel communications path is allocated for communications to and from each device.
Compared to a parallel interface, however, a serial interface imposes limitations. The parallel interface is inherently faster than a serial interface, because multiple bits of the information in a parallel interface are transmitted simultaneously. In certain very high speed applications, on the other hand, the delay skew among pins of a parallel interface is problematic, and a very high speed serial interface is preferred. To be competitive, a serial interface must typically operate at the high end of the feasibility spectrum with regard to speed. That is, for example, if the interface must provide at an 8 megabit per second throughput, an 8 bit parallel interface could be designed with 8 interconnections, or channels, each operating at 1 megabit. The serial interface, on the other hand, must be designed with an interconnection channel that operates at 8 megabits per second. Because of the typically higher required interconnection speed, serial interfaces are limited with regard to design options that may be available at lower speeds.
A common protocol that is used for single channel communications is a xe2x80x9ccollision avoidancexe2x80x9d protocol. When a device has information to send, it waits for a quiet period on the communications channel, then broadcasts its information. By waiting until the channel is unused before communicating, one device does not purposely interfere with another device that is already using the single communications channel. However, in this protocol, it is possible that two devices may each monitor the channel, detect a quiet period, and then each start their respective transmission on the single channel. Two (or more) simultaneous transmissions on a single channel is termed a xe2x80x9ccollisionxe2x80x9d, and neither transmission will be recoverable at their intended receiver. To compensate for the likelihood of collisions, typical protocols provide for a collision recovery scheme. Traditionally, the protocol requires that each transmitter monitor the channel to detect a collision and take appropriate action when a collision is detected. Typically, the appropriate action is to cease transmission (commonly termed xe2x80x9cback offxe2x80x9d), then recommence transmission at the next detected quiet period. To avoid repeated collisions between the same devices after a collision, the protocol typically requires that each device attempt a retransmission after a random duration of the quiet period. In this manner, the device having the shorter random duration will commence transmission and the device with the longer random duration will detect this transmission and wait until the next quiet period.
Collision detection is a somewhat complex process, because the transmission of information from one device will typically interfere with the reception of a possible transmission from another device over the same channel. In general, collision detection requires that the transmitter transmit a signal that can be overwhelmed by a transmission from another device. For example, the transmitter may xe2x80x9ctransmitxe2x80x9d a high-impedance state, by transmitting neither a logic high value, nor a logic low value. The transmitting device monitors the communications channel during the duration of the high-impedance state. If this transmitter is the only transmitter communicating on the communications channel, the communications channel will remain in a high-impedance state or drift to a known logic state. If, on the other hand, another transmitter is transmitting on this channel, the communications channel will change state in response to the other transmission. When the transmitting device detects the changing state, it declares a collision, backs off, and attempts a retransmission at the next quiet period. In like manner, because a collision corrupts the transmission of each device, the other transmitting device is also configured to monitor for collisions, and backs off when the collision is detected. As is evident to one of ordinary skill in the art, the collision detectionxe2x80x94back offxe2x80x94retransmit scenario introduces throughput delays, and the likelihood of collisions and their adverse effects of throughput become multiplicative as the volume of traffic over the channels increase, because of the repeated retransmissions after each collision.
The collision detectionxe2x80x94back offxe2x80x94retransmit scenario is particularly problematic to high speed peripheral devices such as magnetic disks, CDs, and the like. Typically, the peripheral has access to the data at particular times, such as when the appropriate area of a spinning disk is under the read head of the device. If the data cannot be communicated when the data is available for access, the peripheral device must contain a storage buffer to hold the data until it can be transmitted, or loose a revolution thereby reducing the transfer rate. Additional collisions, or additional delays incurred while awaiting a retransmission opportunity, will require additional storage buffers, or a cessation of data access until buffer space becomes available. Also, because of the random nature of collisions and the aforementioned dependency on traffic volume, it is difficult to assure a given throughput without providing an overabundance of storage. That is, to assure a given throughput regardless of the impact of collisions, the amount of storage provided must be sufficient to buffer the effects of the worst-case collision scenario; consequently, during normal operations, with average occurrences of collisions, most of the storage provided for collision compensation will be unused.
It is an object of this invention to provide a method and apparatus for serial communications that has a throughput that is independent of the likelihood of collisions. It is a further object of this invention to eliminate the need for collision detection in a peripheral device. It is a further object of this invention to minimize the need for storage buffers in the peripheral device.
These objects and others are achieved by providing a collision based protocol that assures that one device in a network always xe2x80x9cwinsxe2x80x9d a collision conflict. A device in accordance with this invention that is assured of always winning a collision conflict need not contain a collision detector, nor the storage resources typically used to buffer the effects of a collision.